package xju_5_6.advice;

import org.aspectj.lang.ProceedingJoinPoint;

public class XmlAdvice {
    // 前置
    public void before() {
        System.out.println("before");
    }

    // 后置
    public void after() {
        System.out.println("after");
    }
    // 返回
    public void afterReturning() {
        System.out.println("afterReturning");
    }
    // 环绕
    public void around(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("around 环绕通知之前部分");
        joinPoint.proceed();
        System.out.println("around 环绕通知之后部分");
    }

    // 异常
    public void afterThrowing() {
        System.out.println("afterThrowing");
    }
}
